﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Interop;
using System.Windows.Shapes;

namespace jabberclient1
{
	/// <summary>
	/// Interaction logic for login.xaml
	/// </summary>
	public partial class login : Window
	{
		
		public login()
		{
			this.InitializeComponent();
			
			// Insert code required on object creation below this point.
		}
		private void Window_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
			
            
		}
		
		private void Window_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
		{
	    }

		private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
			
		}
		private void Window_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
			
		}
		protected override void OnSourceInitialized(EventArgs e)
    {
        HwndSource hwndSource = (HwndSource)HwndSource.FromVisual(this);
        hwndSource.AddHook(WndProcHook); 
        base.OnSourceInitialized(e);
    }

    private static IntPtr WndProcHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handeled)
    {
        if (msg == 0x0084) // WM_NCHITTEST
        {
            handeled = true;
            return (IntPtr)2; // HTCAPTION
        }
        return IntPtr.Zero;
    }
    }
}	